dangling pointer - definição. O que é dangling pointer. Significado, conceito
Diclib.com
Dicionário ChatGPT
Digite uma palavra ou frase em qualquer idioma 👆
Idioma:

Tradução e análise de palavras por inteligência artificial ChatGPT

Nesta página você pode obter uma análise detalhada de uma palavra ou frase, produzida usando a melhor tecnologia de inteligência artificial até o momento:

  • como a palavra é usada
  • frequência de uso
  • é usado com mais frequência na fala oral ou escrita
  • opções de tradução de palavras
  • exemplos de uso (várias frases com tradução)
  • etimologia

O que (quem) é dangling pointer - definição

POINTER THAT DOES NOT POINT TO A VALID OBJECT
Dangling reference; Wild pointer; Dangling Reference; Dangling pointers; Wild reference; Use after free; Use-after-free; Use After Free
  • Dangling pointer

dangling pointer         
<programming> A reference that doesn't actually lead anywhere. In C and some other languages, a pointer that doesn't actually point at anything valid. Usually this happens because it formerly pointed to something that has moved or disappeared, e.g. a heap-allocated block which has been freed and reused. Used as jargon in a generalisation of its technical meaning; for example, a local phone number for a person who has since moved is a dangling pointer. [Jargon File]
Dangling pointer         
Dangling pointers and wild pointers in computer programming are pointers that do not point to a valid object of the appropriate type. These are special cases of memory safety violations.
Function pointer         
POINTER THAT POINTS TO A FUNCTION
Function pointers; Pointer to function; Method pointer; Function Pointer; Procedure Pointer; Subroutine pointer
A function pointer, also called a subroutine pointer or procedure pointer, is a pointer that points to a function. As opposed to referencing a data value, a function pointer points to executable code within memory.

Wikipédia

Dangling pointer

Dangling pointers and wild pointers in computer programming are pointers that do not point to a valid object of the appropriate type. These are special cases of memory safety violations. More generally, dangling references and wild references are references that do not resolve to a valid destination.

Dangling pointers arise during object destruction, when an object that has an incoming reference is deleted or deallocated, without modifying the value of the pointer, so that the pointer still points to the memory location of the deallocated memory. The system may reallocate the previously freed memory, and if the program then dereferences the (now) dangling pointer, unpredictable behavior may result, as the memory may now contain completely different data. If the program writes to memory referenced by a dangling pointer, a silent corruption of unrelated data may result, leading to subtle bugs that can be extremely difficult to find. If the memory has been reallocated to another process, then attempting to dereference the dangling pointer can cause segmentation faults (UNIX, Linux) or general protection faults (Windows). If the program has sufficient privileges to allow it to overwrite the bookkeeping data used by the kernel's memory allocator, the corruption can cause system instabilities. In object-oriented languages with garbage collection, dangling references are prevented by only destroying objects that are unreachable, meaning they do not have any incoming pointers; this is ensured either by tracing or reference counting. However, a finalizer may create new references to an object, requiring object resurrection to prevent a dangling reference.

Wild pointers arise when a pointer is used prior to initialization to some known state, which is possible in some programming languages. They show the same erratic behavior as dangling pointers, though they are less likely to stay undetected because many compilers will raise a warning at compile time if declared variables are accessed before being initialized.